<!DOCTYPE html>
<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->

  <head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width" />
    <title>Infinite Cave Adventure (highscores)</title>
    <link href="http://fonts.googleapis.com/css?family=PT+Sans" rel="stylesheet" type="text/css" />
    <link rel="stylesheet" href="css/main.css" />
  </head>

  <body>
    
    <!-- Main page -->
    
    <div class="row">    

      <div id="highscore">
        <h3>Highscore table</h3>

        <script id="num_games_tmpl" type="text/html">
          <b>{{num_games}}</b>
        </script>

        <p>From a total of <span id="num_games"></span> games logged so far.
        </p>

        <script>
          function qqpp() {
              return function (x, render) { return "!!"+render(x)+"!!"; }
          }
        </script>

        <script id="scorelines_tmpl" type="text/html">
          <ol>
            {{#.}}
            <li>
            <span class="success label">{{name}}</span>,
            {{#victory}}
            a glorious victor of
            {{/victory}}
            level {{plev}}. <small>
              {{#victory}}
              Last seen
              {{/victory}}
              {{^victory}}
              Killed on
              {{/victory}}
              dungeon level <b>{{dlev}}</b>. Net worth: <b>{{worth}}</b> $ZM.</small>
            {{#rcodes}}
            <small>(Replay codes were used <b>{{rcodes}}</b> times.)</small>
            {{/rcodes}}
            </li>
            {{/.}}
          </ol>
        </script>

        <div class="expander" onclick="$('#panel_plev').toggle();">▶ ... by player level</div>
        <div class="highscores" id="panel_plev">
        </div>

        <div class="expander" onclick="$('#panel_dlev_d').toggle();">▶ ... by lowest dungeon level</div>
        <div class="highscores" id="panel_dlev_d">
        </div>

        <div class="expander" onclick="$('#panel_dlev_a').toggle();">▶ ... by highest dungeon level</div>
        <div class="highscores" id="panel_dlev_a">
        </div>

        <div class="expander" onclick="$('#panel_worth').toggle();">▶ ... by net worth</div>
        <div class="highscores" id="panel_worth">
        </div>

        <div class="expander" onclick="$('#panel_ts').toggle();">▶ last 10 games</div>
        <div class="highscores" id="panel_ts">
        </div>

        <script id="stats_tmpl" type="text/html">
        </script>

      </div>
      <p/>
    </div>

    <script src="/js/jquery.js"></script>
    <script src="/js/mustache.js"></script>
    <script src="/js/highscore.js"></script>

    <script>
      $(document).ready(do_highscore);
    </script>


  </body>
</html>
